home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / boot / netBoot.new / h / exception.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-19  |  1.3 KB  |  41 lines

  1.  
  2. /*    @(#)exception.h 1.1 86/09/27 SMI    */
  3.  
  4. /*
  5.  * Copyright (c) 1986 by Sun Microsystems, Inc.
  6.  */
  7.  
  8. #define    SHORT_FORMAT    0x0
  9. #define    LONG_FORMAT    0x8
  10.  
  11. struct ex_info {
  12.     u_short        e_sr;        /* status register */
  13.     u_char        *e_pc;        /* program counter */
  14.     unsigned    e_format:4;    /* 0 is short, 1000 is long */
  15.     unsigned    e_offset:12;    /* vector offset */
  16.     unsigned    e_rr:1;        /* rerun flag 0 = cpu 1 = software */
  17.     unsigned    :1;        /* MBZ */
  18.     unsigned    e_if:1;        /* was inst fetch */
  19.     unsigned    e_df:1;        /* was data fetch to input buffer */
  20.     unsigned    e_rm:1;        /* was read/modify/write cycle */
  21.     unsigned    e_hb:1;        /* high byte transfer on data */
  22.     unsigned    e_by:1;        /* 0 is word, 1 is HB selects byte */
  23.     unsigned    e_rw:1;        /* read write flag 0 write 1 read */
  24.     unsigned    :5;        /* MBZ */
  25.     unsigned    e_fc:3;        /* function code */
  26.     u_char        *e_fault;    /* fault address */
  27.     unsigned    :16;        /* not used */
  28.     u_short        e_dataout;    /* data output buffer */
  29.     unsigned    :16;        /* not used */
  30.     u_short        e_datain;    /* data input buffer */
  31.     unsigned    :16;        /* not used */
  32.     u_short        e_inst;        /* instruction input buffer */
  33.     u_short        e_internal[16];    /* internal state info */
  34. };
  35.     
  36. extern int        exception_print;    /* non-zero means print */
  37. extern int        ex_handler();        /* used to declare vector */
  38. extern int        (*exception_handler)();    /* user routine to call with
  39.                          * ex_info struct as arg 
  40.                          * zero implies no use */
  41.